<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html>
<html>
<head>
<jsp:include page="../head.jsp"/>
<title>信息工程学院成教管理系统-学生学籍</title>
</head>
<body>
	<div class="container">
		<jsp:include page="../menu.jsp"/>
			<div class="row">
    			<div class="col-md-6">
    				<form class="form-horizontal" method="post" action="infoselect.do">
    				<div class="form-group has-feedback">
    					<label class="col-md-2 control-label">学号</label>
    					<div class="col-md-5">
    						<input type="text" class="form-control" name="username">
    					</div>
						<div class="col-md-2">
							<button type="submit" class="btn btn-default btn-sm active" >查询</button>
						</div>
					</div>
					</form>
				</div>
			</div>
    		<div class="text-center"> 
    			<table class="table table-striped table-bordered">
					<tr>
						<td>学号</td>
						<td>姓名</td>
						<td>性别</td>
						<td>身份证号</td>
						<td>所在班级</td>
						<td>所在学院</td>
						<td>录取时间</td>
						<td>预计毕业时间</td>
						<td>编辑</td>
					</tr>
					<c:forEach items="${students}" var="student">
					<tr>
						<td>${student.sno}</td>
						<td>${student.sname}</td>
						<td>${student.sex}</td>
						<td>${student.cardid}</td>
						<td>${student.clazz.name}</td>
						<td>${student.clazz.college}</td>
						<td>${student.entertime}</td>
						<td>${student.gradtime}</td>
						<td><a href="toalterinfo.do?sno=${student.sno }">修改</a></td>
					</tr>
					</c:forEach>
			</table>
		</div>
		<div class="page" align="center">
			<nav>
  				<ul class="pagination">
  					<c:if test="${page>1}">
    				<li>
     					<a href="tinformation.do?page=${page-1}" aria-label="Previous">
        					<span aria-hidden="true">&laquo;</span>
      					</a>
    				</li>
    				</c:if>
    				<c:forEach var="i" begin="1" end="5">
    				
    				<c:if test="${page+i-5+2>0 && page+i-5+2<=maxpage}">
    				<li><a href="tinformation.do?page=${page+i-5+2}">${page+i-5+2}</a></li>
    				</c:if>
    				</c:forEach>
    				<c:if test="${page<maxpage}">
    				<li>
      					<a href="tinformation.do?page=${page+1}" aria-label="Next">
        					<span aria-hidden="true">&raquo;</span>
      					</a>
    				</li>
    				</c:if>
  				</ul>
			</nav>
		</div>
	</div>
</body>
</html>